Communication using bi-directional LEDs

ABSTRACT

An optical communications transceiver includes an LED coupled in series with a resistor. A microprocessor has one I/O pin connected to the LED. In a first mode or transmit mode, the LED is periodically driving in forward bias to emit light to transmit data. In a second or receive mode, the LED is periodically not driven in reverse bias, e.g., reverse bias or zero bias. Then, the LED is allowed to change charge of the capacitance of the LED&#39;s junction using a photo-current. The change in charge is measured using a timer. When the change in charge exceeds a predetermined threshold, input light is sensed. Thus, the LED can be used to receive data in the second mode.

RELATED APPLICATION

This application is a continuation-in-part application of U.S. patentapplication, Ser. No. 10/115,299 now U.S. Pat. No. 6,664,744 “AutomaticBacklight for Handheld Devices,” filed by Dietz on Apr. 3, 2002.

FIELD OF THE INVENTION

This invention relates generally to light emitting diodes (LEDs), andmore particularly to LEDs used for bi-directional opticalcommunications.

BACKGROUND OF THE INVENTION

Light emitting diodes (LEDs) are inexpensive and widely used as lightsources. Their diverse applications include numeric displays,flashlights, liquid crystal backlights, vehicle brake lights, trafficsignals, backlights, and the ubiquitous power-on indicator light onalmost every electronic device, and modern electrical appliance.

Because LEDs are most often used as light emitters, it is easy to forgetthat they can also operate as photodiodes, i.e., light detectors.Although most LEDs are designed as light emitters, and not lightdetectors, all LEDs can effectively operate in either mode.

This interchangeability between solid-state light emission and lightdetection was first described in the 1970's, but has since been largelyforgotten by LED users, see Mims, “Siliconnections: Coming of Age in theElectronic Era,” McGraw-Hill, New York, N.Y., 1986, and Mims, “LEDCircuits and Projects,” Howard W. Sams and Co., Inc., New York, N.Y.,1973.

Light emitting diodes emit light in a fairly narrow frequency band whena small current is applied in the correct direction through the diode,i.e., with a forward bias. Because the current-voltage characteristic isexponential, it is difficult to control a voltage applied directlyacross an LED accurately enough to attain a desired current.

Therefore, some means must be provided to limit the current. In discreteelectronic systems, this is typically done by placing a resistor inseries with the LED. Because most microprocessor I/O pins can sink morecurrent than they can source, the configuration shown in the FIG. 1 isthe most common way of driving an LED from a microprocessor ormicrocontroller.

FIG. 1 shows a typical prior art LED emitter circuit 100. An I/O pin 101of a microprocessor 100 is used to sink current through an LED 102 witha resistor 103 to limit the amount of current.

One important application that uses LEDs is optical signalcommunications. In most prior art optical communications applications,an LEDs is used in the transmitter, and a photodiode is used in thereceiver. In addition, Each component is typically driven separately bya specially designed circuit. The photodiodes are most oftenspecifically designed to receive optical signals in a specific narrowfrequency range. Most photodiodes cannot emit light. Consequently, thereis one circuit that drives the transmitter, and another circuit fordriving the receiver. This increases the cost and complexity of thecommunications system.

Therefore, it is desired to provide a light emitting diode that can beused as both a transmitter and receiver in an optical communicationssystem.

SUMMARY OF THE INVENTION

An optical communications transceiver includes an LED coupled in serieswith a resistor. A microprocessor has at least one I/O pin connected tothe LED. In a first mode or transmit mode, the LED is periodicallydriving in forward bias to emit light to transmit data. In a second orreceive mode, the LED is periodically not driving in reverse bias, e.g.,reverse bias or zero bias, and then allowed to change charge of thecapacitance of the LED's junction using a photo-current. The change incharge is measured using a timer. When the change in charge exceeds apredetermined threshold, input light is sensed. Thus, the LED can beused to receive data in the second mode.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is schematic of a prior art light emitter circuit;

FIG. 2 is a schematic of an LED emitter/detector circuit according tothe invention;

FIGS. 3 a–c shows the circuit of FIG. 2 operating in forward bias, notforward bias, and discharge modes, respectively;

FIG. 4 shows multiple LED based transceivers coupled in a communicationsnetwork;

FIG. 5 is a schematic of an alternative embodiment of the LEDemitter/detector circuit using a single I/O pin according to theinvention; and

FIG. 6 is a block diagram of two transceivers exchanging opticallymodulated data via a double convex lens according to an embodiment ofthe invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Dual Pin LED DataTransceiver

FIG. 2 shows an LED emitter/detector circuit according to the invention.Here, an LED 202 and resister 203 are coupled in series between two I/Opins 201 of a microprocessor or microcontroller 200. Now both ends ofthe LED/resistor circuit 202-203 are connected to the microprocessor200. The I/O pin can be set low (0V), high (5V), or the pin can be usedas an input, using conventional programming techniques.

Operating Modes

FIGS. 3 a–c show how this circuit can operate in three modes, forwardbias or “light,” not forward bias or “reverse bias” and “discharge,” orsense respectively. In the light mode of FIG. 3 a, the LED operatesconventionally and emits light. The emitted light can be modulated totransmit data. In reverse bias mode of FIG. 3 b, the normal emittingpolarities are switched to reverse bias the junction of the diode. Bythen releasing one end in discharge mode of FIG. 3 c, i.e., setting thatend to be an input to the microprocessor, an optically generatedphoto-current can optically discharge the junction at a rateproportional to the amount of received or sensed light. If the sensedlight is modulated, then data can be received. The capacitive dischargecan easily be measured. Because Q=CV, and C is known, measuring thechange in charge effectively measures the change in voltage.

At some point, the voltage on the input pin crosses a predeterminedinput threshold T. By timing how long this takes, a high-resolutionmeasurement of the sensed light level is made. The time measurement canbe simply done by a counter 210 or clock signal in the microprocessor200. For example, a small program loop that alternatively increments thecounter 210 and until the threshold T is exceeded.

The circuit according to the invention requires no addition components,and draws extremely little power during sensing. By switching betweenemitting and sensing modes, the LED can operate both as a transmitterand a receiver (transceiver) in an optical communications network.

FIG. 4 shows two such transceivers 401–402 connected by an optical link403. The link 403 can be any transparent medium such as air, or anoptical fiber cable.

Single Pin LED Transceiver

Surprisingly, it is also possible to construct a single LED transceiverby using only a single I/O pin of the microprocessor as shown in FIG. 5.

As shown in FIG. 5, a microprocessor or microcontroller 500 has one I/Opin 501 connected to the input of the LED 502, and the output of the LEDis connected to a current limiting resistor 503. In this circuit, it isnot possible to reverse bias the LED 502, as above for the circuit ofFIG. 2. Instead the LED is shorted to zero bias by setting the I/O pin501 to low.

Then, the pin 501 is set to input, which charges the LED's junction'scapacitance when a photo-current induced by incident light is sensed.This continues until the voltage across the LED forward-biases thejunction enough to effectively use up all of the photo-current insidethe LED. If this voltage is made to pass a predetermined digital inputthreshold, the same basic timing technique can be used as describedabove to receive data.

However, this is a difficult constraint. Standard red, green, orange andyellow LEDs typically “turn-on” at around 1.5V to 2V, which is generallybelow digital input thresholds on 5V systems, such as the microprocessor500. However, blue LEDs, and some newer high brightness LEDs can haveforward voltage drops around 3V, which is high enough to allow it tocharge past the input threshold. Lower voltage systems, e.g., 3V systemsor lower, have lower input thresholds, so they are more amenable to thistechnique.

Also, the circuit in FIG. 5 is generally superior to that of FIG. 2because thresholds are often biased closer to ground than the supplyvoltage V_(DD). It should be noted that the one pin version can beoperated in reverse with the resistor connected to the I/O pin 501 as inFIG. 1.

The advantage of the pin transceiver is that any suitable LED indicatordriven by a single pin of a microprocessor, as many are, can now alsooperate as a transceiver simple by changing the firmware or software tooperate as described above. No alteration of the hardware is required.Therefore, it is easy to upgrade standard LED indicator to also functionas a transceiver by a software change. This embodiment is also suitedfor systems where the number of I/O pins is limited.

Bi-Directional Communications

In one communications application, two unsynchronized transceiversphase-lock to each other and exchange pulse-width-modulated databi-directionally. In this protocol, the two receivers take turns tooperate in transmit and receive mode, and a relatively short light pulseindicates a 0 or space state, and a relatively long light pulseindicates a 1 or mark state.

Idle Cycle

This protocol starts in an idle cycle with the transceiver performing anidling cycle. In the idle cycle, the transceiver transmits a onemillisecond light pulse followed by a four millisecond receive period.During the receive period, the transceiver executes multiple lightmeasurements. These light measurements provide only a one bit ofresolution, i.e., whether the incoming light flux is above or below apredetermined threshold, nominally about 1.5V.

Synchronization Loop

The idling cycle continues until at least two measurement times insuccession indicate “light seen.” At this point, the transceiver assumesan incoming pulse of light from another transceiver has been detected,and shifts from the idling loop to a slightly faster synchronizing loop.During the synchronizing loop, the transmitted light pulse is still onemillisecond ON, but followed by a variable number of light measurements.When in the synchronizing loop, the microprocessor terminates themeasurement set after either a predetermined number of measurements, orwhen the trailing edge of a light pulse is detected. A trailing edge isconsidered to be found when a pair of back-to-back measurements bothindicate “light seen” followed by ten measurements without “light seen.”

The execution pattern inside the synchronize loop is therefore composedof one transceiver's LED on for one millisecond, then a one millisecondperiod with both LEDs off, followed by the other transceiver's LED onfor one millisecond, and finally both LEDs off for one millisecond. Evenif the transceivers have clock frequency errors of up to 25%, they willstill be able to synchronize. The nominal synchronize loop pulse rate is250 Hz, with a 25% duty cycle.

Data Communications

During communication, data bits are transmitted in asynchronous form.For example, a one millisecond light pulse, indicates a MARK and a 0.5millisecond light pulse indicates a SPACE. The system normally idleswith MARK bits being transmitted. Here, the operation of the datatransfer loop is the same as the synchronize loop. During datatransmission, the format is at least 16 MARK bits to allowsynchronization, then a single SPACE as a start bit, followed by eightbits of data, followed by one MARK as a stop bit. This is similar to thecommon 8-N-1 RS-232 format.

To decode the light pulses, the receiving transceiver keeps a count of“light seen” measurements for each execution of the synchronize loop. Ifseven or fewer light-seen measurements are counted, then a SPACE isrecorded; if eight or more pulses are counted, then a MARK is recorded.The usual asynchronous deframing, i.e., dropping the leading SPACE startbit and the trailing MARK stop bit, can be performed. The resulting8-bit data word is then available to the application-level program.Simple data communications can also be combined with error correctionand encryption. Other optical communications protocols are alsopossible.

As shown in FIG. 6, wherein two transceivers 601 exchange opticallymodulated data via a double convex lens 602, to provide an electricallyisolated communications link, data rate in excess of 1 MHz can beachieved.

Programmable Key

The transceiver according to the invention can also be used as aprogrammable key and programmable lock. Although many other technologiesare used in intelligent keys, e.g., RFID, card-keys, etc., thetransceiver according to the invention requires no physical contact sothere is no wear unlike in some card-key systems, and not magneticstripe. Unlike RF systems, it is can be made directional and short rangeso that the user has complete control over what is being unlocked. Thisallows a single key to be used for many different locks without thepossibility of unlocking the wrong lock just because it is nearby.Because the transceiver is inherently bi-directional, challenge andresponse and encryption protocols can be used, which can make the keyvery difficult to copy or spoof. The visible nature of the LED allowsfor some user interface. At the very least, the user can easily tellwhether the transceiver is operating or if the battery is dead.Additionally, when used as a key, the transceiver also operatessimultaneously as a flashlight.

Perhaps, the most interesting, advantage is that transceiver is capableof peer-to-peer communication. Any transceiver can pass information orauthorization to another transceiver. In this case, the transceiver canlearn an unlock code, and pass that code to other transceivers. Thisability to pass information along is unique, and not a capability ofsmart cards or RFID tags.

Authentication and Security

In some applications, the peer-to-peer ability to transfer informationor authorization is desirable. In other applications, such as financialand other secure transactions, authentication is as important as thedata transfer itself, and the uncontrolled passing of authority must beprevented. An unfortunate side effect of the programmable nature of thetransceiver is that there is no guarantee that another transceiver willrespect any “do not forward” data tags that may be inserted by anapplication. Non-transferable authorization and unforgeableproof-of-identity are difficult problems with many subtleties.

However, simple cryptography is possible and can be used to keep thetransceivers transactions secure from eavesdropping and spoofing. Themicroprocessor used has sufficient power to implement common symmetriccryptographic algorithms. These require the transmitter and receiver toshare a secret key so communication between any two transceivers isconfigured in advance. The transceiver can be equipped with sufficientmemory to hold many symmetric encryption keys and can therefore be setup to communicate with a large number of other transceivers.

Zero-Knowledge Proof

Zero-knowledge proofs (ZKP) and public-key (or asymmetric) cryptographyenable the transceiver to securely prove its identity and communicatewith any transceiver that had access to published information, seeSchneier, “Applied Cryptography,” 2nd edition, John Wiley and Sons, NewYork, N.Y., 1996, pp. 101–111. No shared secrets are necessary.

With the transceiver according to the invention, any LED can easily beconverted to a communications transceiver. This has broad implicationsbecause LEDs are widely used as power-on indicators inmicroprocessor-based transceivers. The indicator is usually not wireddirectly to the power supply, but is connected through themicroprocessor so that a minimal user interface, e.g., some blinking, isavailable.

Here are some applications that can use the LED transceiver according tothe invention.

A CRT monitor can blink its power light to indicate a low-power “sleep”state. Newer CRT monitors are usually equipped with USB, both to controlmonitor settings. Adding the transceiver circuit according to theinvention can provide a complete data path from the power LED to anearby computer, allowing the transceiver to be used as a key, asdescribed above. This can be used instead of or, in addition to apassword to log in to the computer, or could be used as a cryptographicauthentication transceiver for e-commerce. A similar technique could beused with keyboard indicator lights.

With the transceiver, a user can copy a full diagnostic state of amalfunctioning appliance via the power-on LED, and transmit thediagnostic information to a service site. No special display orconnector are required on the appliance.

The transceiver can be used to exchange phone numbers or other personalinformation using the power indicator or LED backlight of cell phones,PDAs, and the like. One interesting application has the transceiverembedded in toys, e.g., stuffed animals, so that the toys can“communicate” with each other.

Although the invention has been described by way of examples ofpreferred embodiments, it is to be understood that various otheradaptations and modifications may be made within the spirit and scope ofthe invention. Therefore, it is the object of the appended claims tocover all such variations and modifications as come within the truespirit and scope of the invention.

1. An optical communications transceiver, comprising: means forperiodically driving an LED in forward bias to emit light to transmitdata; means for periodically not driving the LED in forward bias; andmeans for measuring a time interval, the time interval dependent on achange in capacitance of the LED, the change in capacitance proportionalto an amount of light sensed by the LED, wherein the LED is coupled inseries with a resistor and a microprocessor having a first I/O pinconnected to the LED and a second I/O pin coupled to the resistor, andin which the microprocessor includes the means for periodically drivingthe LED in forward bias and the means for periodically not driving theLED in forward bias and the means for measuring the time interval. 2.The transceiver of claim 1 wherein the LED is driven in reverse bias andthen capacitively discharged with a photo-current to measure the levelof light.
 3. The transceiver of claim 1 wherein the LED is driven inzero bias and then capacitively charged with a photo-current to measurethe level of light.
 4. The transceiver of claim 1 further comprising aplurality of transceivers coupled by a transparent medium.
 5. Thetransceiver of claim 1 further comprising: phase-lock means forsynchronizing the transceiver with another transceiver.
 6. Thetransceiver of claim 1 wherein a first transceiver is embedded in aprogrammable key, and a second transceiver is embedded in a programmablelock.
 7. The transceiver of claim 1 wherein the LED additionallyoperates as a power-on indicator when emitting light.
 8. The transceiverof claim 1 wherein the LED is connected to the means for measuring via aresistor.
 9. The transceiver of claim 1 wherein the LED is embedded inan appliance.
 10. An optical communications transceiver, comprising: anLED coupled in series with a resistor; a microprocessor having a firstI/O pin connected to the LED and a second I/O pin coupled to theresistor, in which the microprocessor further comprises: means forperiodically driving the LED in forward bias to emit light to transmitdata; means for periodically driving the LED in reverse bias; means formeasuring a time interval, the time interval dependent on a change incapacitance of the LED, the change in capacitance proportional to anamount of light sensed by the LED.
 11. An optical communicationstransceiver, comprising: an LED coupled in series with a resistor; amicroprocessor having an I/O pin connected to the LED and ground coupledto the resistor, in which the microprocessor further comprises: meansfor periodically driving the LED in forward bias by setting the I/O pinto high to emit light for transmitting data; means for periodicallydriving the LED in zero bias by setting the I/O pin to low, and thensetting the I/O pin to input to optically charge the LED; and means formeasuring a time interval, the time interval dependent on a change incapacitance of the LED, the change in capacitance proportional to anamount of light sensed by the LED.
 12. An optical communicationstransceiver, comprising: an LED coupled in series with a resistor; amicroprocessor having an I/O pin connected to the resistor and groundcoupled to the LED in which the microprocessor further comprises: meansfor periodically driving the LED in forward bias by setting the I/O pinto high to emit light for transmitting data; means for periodicallydriving the LED in zero bias by setting the I/O pin to low, and thensetting the I/O pin to input to optically charge the LED; and means formeasuring a time interval, the time interval dependent on a change incapacitance of the LED, the change in capacitance proportional to anamount of light sensed by the LED.
 13. A method for transceiving data,comprising: periodically driving an LED in forward bias to emit light totransmit data, in which the LED is coupled in series with a resistor,and a microprocessor has an I/O pin connected to the resistor and groundcoupled to the LED; periodically not driving the LED in forward bias,and then optically changing a charge of a capacitance of the LED afternot driving the LED in forward bias; and measuring a time interval, thetime interval dependent on a change in capacitance of the LED, thechange in capacitance proportional to an amount of light sensed by theLED.
 14. The method of claim 13, in which the measuring is performed bya counter of the microprocessor.